#include "registerwidget.h"
#include "ui_registerwidget.h"

RegisterWidget::RegisterWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::RegisterWidget) {
    ui->setupUi(this);
    ui->btnRegister->setDefault(true);

    setupButtonStyleLeft(ui->btnRegisterToLogin);

    connect(ui->btnRegisterToLogin, &QPushButton::clicked, this, &RegisterWidget::returnToLogin);
}

void RegisterWidget::setupButtonStyleLeft(QPushButton *button)
{
    button->setStyleSheet(
        "QPushButton {"
        "border: none; /* 无边框 */"
        "text-align: left;"
        "color: blue; /* 正常状态下文字颜色 */"
        "}"
        "QPushButton:hover {"
        "color: red; /* 悬浮状态下文字颜色 */"
        "}"
    );
}

RegisterWidget::~RegisterWidget() {
    delete ui;
}


